#!/bin/bash
echo "Enter your email: "  
read YOUR_EMAIL
echo "Enter your name for git"
read YOUR_NAME

git config --global user.name "YOUR_NAME"
git config --global user.email "$YOUR_EMAIL"
git config --global credential.helper store

if [ ! -f ~/.ssh/id_rsa.pub ]; then
ssh-keygen -t rsa -C "$YOUR_EMAIL"
fi

echo "Set the following PublicKey to gitee and press enter to continue"
cat ~/.ssh/id_rsa.pub
read READY
echo "Checking PublicKey..."
ssh -T git@gitee.com
